import request from '@/utils/request'

const api_name = `/api/order/orderInfo`

export default {
  /**
   * 生成订单
   * @param scheduleId 排班Id
   * @param patientId 病人Id
   * @returns {AxiosPromise}
   */
  submitOrder(scheduleId, patientId) {
    return request({
      url: `${api_name}/auth/submitOrder/${scheduleId}/${patientId}`,
      method: 'post'
    })
  },
  /**
   * 订单详情
   * @param orderId 订单Id
   * @returns {AxiosPromise}
   */
  getOrders(orderId) {
    return request({
      url: `${api_name}/auth/getOrders/${orderId}`,
      method: `get`
    })
  },
}
